<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- http://hge.relishgames.com -->

<html>

<head>
<meta name="Keywords" content="game engine, 2d, hardware accelerated, hge, engine, relish games, game development">
<meta name="Description" content="Haaf's Game Engine - Hardware accelerated 2D games engine">
<title>Haaf's Game Engine - Hardware accelerated 2D games engine</title>
<link rel=stylesheet type=text/css href=hge.css>
<script language="JavaScript" src="hge.js"></script>
</head>

<body onload="setContents('cnt_hgedata.html');" bgcolor=#ffffff text=#000000 link=#7F0000 vlink=#7F0000 alink=#7F0000 marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
<table height=100% cellspacing=0 cellpadding=0 border=0><tr>

<td valign=top>
<table width=566 cellspacing=0 cellpadding=20 border=0><tr><td>
<h1 style="margin-top:0px">HGE System state value class</h1>
<p>
<b>T</b>o change and obtain various <b>HGE</b> internal states the two functions are used:
<a href="hgefunc_systemsetstate.html">System_SetState</a> and <a href="hgefunc_systemgetstate.html">System_GetState</a>.
The <b>hgeValue</b> class serves to pass and receive a value of an arbitrary type.
</p>
<pre>
class hgeValue
{
public:
  hgeValue(int value);
  hgeValue(bool value);
  hgeValue(const char *value);
  hgeValue(bool (*value)());

  union
  {
    int         <b>int_value</b>;
    bool        <b>bool_value</b>;
    const char* <b>string_value</b>;
    bool        (*<b>func_value</b>)();
  };
};
</pre>
<p>
So, to pass a value of an arbitrary type to the <a href="hgefunc_systemsetstate.html">System_SetState</a>
function you may specify it directly in the call. And to receive an arbitrary value
returned by <a href="hgefunc_systemgetstate.html">System_GetState</a> function, you just
access the corresponding member of the returned <b>hgeValue</b> object.
</p>
<h2>Requirements</h2>
<p>
<b>Header:</b> hge.h
</p>
<h2>See also</h2>
<p>
<a href="hgefunc_systemsetstate.html">System_SetState</a>,
<a href="hgefunc_systemgetstate.html">System_GetState</a>
</p>
<br>
</td></tr></table>
</td>

</tr></table>
</body>

</html>